Standardized local assortativity in networks and systemic risk in financial markets

The study of assortativity allows us to understand the heterogeneity of networks and the implication of network resilience. While a global measure has been predominantly used to characterize this network feature, there has been little research to suggest a local coefficient to account for the presence of local (dis)assortative patterns in diversely mixed networks. We build on existing literature and extend the concept of assortativity with the proposal of a standardized scale-independent local coefficient to observe the assortative characteristics of each entity in networks that would otherwise be smoothed out with a global measure. This coefficient provides a lens through which the granular level of details can be observed, as well as capturing possible pattern (dis)formation in dynamic networks. We demonstrate how the standardized local assortative coefficient discovers the presence of (dis)assortative hubs in static networks on a granular level, and how it tracks systemic risk in dynamic financial networks.

There are various measures for quantifying network structures, such as network degree and clustering coefficients to summarize the network size and the embeddedness of nodes in networks, respectively.Assortativity, or assortative mixing [4], is another measure used to quantify networks and tells us how likely nodes are to connect with other nodes that are similar to themselves.Sociological studies often describe assortative mixing as homophily, a phenomenon often found in a variety of social networks, among humans [20][21][22] and in nature [23].In homophilous behavior, people tend to bond with others who are similar to themselves when they share common socio-demographic, behavioral, and intra-personal characteristics, such as gender, ethnicity, hobbies, and values, resulting in homogeneous personal networks for each individual [21].Human networks are dynamic and individuals tend to form bonds with cooperators and break ties with defectors [22].Constant formations and dissolutions of relationships form a continuously evolving human ecology.The evolution and ubiquity of homophily is affected by natural selection in that through collaborations and interactions with similar others, individuals create synergy and provide complementary skills to increase potential gains [24].Over time, humans have learned to cooperate with assortative others and thereby achieve higher payoffs [22,25].
Assortativity has implications for network resilience, in terms of how robust and reliable a network remains in the event of faults and operational challenges with some of its nodes [26].In most networks, the connectivity can be destroyed by simply removing a few nodes with the highest number of edges.Consider technology hubs or service providers-they are usually the first targets of attacks because the failure of a few important "hubs" will create a domino effect that can bring down all services connected to them.Therefore, the study of network resilience is of high importance in the field of computer science, especially for highly critical systems in today's digital age [26,27].
Technological networks, along with biological and neural networks, are considered disassortative, suggesting that they are especially vulnerable and likely to be prone to targeted attacks [4].Conversely, the assortative nature of social networks allows them to be more resilient, and their structure is therefore not easily disrupted.In the case of transmittable diseases, core groups in assortatively mixed social networks can form a "reservoir" for diseases that could sustain a pandemic [4].As a result, pandemics have been found to be robust in face of simple targeted attacks on social networks, such as isolating a few infected individuals who have high degrees of connections in the midst of a pandemic [28].Other studies have looked at regional networks to reveal the recent example of how the coronavirus disease 2019 (COVID-19) pandemic spread rapidly across the globe given the network's connectedness [29,30].
Global assortativity (GA) [3,4,[31][32][33] measures the assortative mixing of networks and provides us with a glimpse of several aspects of those networks.In particular, the research provides significant insights into the relationship between global assortativity and network robustness, as well as the role of global assortativity in the evolution of cooperation in networks [31][32][33].However, the coefficient is only representative if most of the nodes of a network have a degree of assortative mixing around the mean, and in some networks that is not the case [34].When networks grow, thanks to technological advancement and easier data collection and storage, it is not hard to imagine that these complex networks could have more diverse local (dis)assortative mixing.As a measurement of averages, local assortative patterns are smoothed out and therefore might not present a full picture of the relationships in the networks.
A number of studies have proposed the use of local assortativity [34,35] to overcome the shortcomings of a global measure, but there has not been a universal definition of how such a local coefficient should be calculated.With the lack of a local coefficient, it is difficult to compare and trace local assortativity features that might tell us more about the networks and reveal previously undiscovered patterns.In response, this study provides examples of when the global assortativity coefficient fails to address networks with local assortative hubs.We further extend the concept of local assortativity based on the existing literature, as well as proposing a standardized formula that we believe is an important add-on because it allows for comparisons on the same scale.We show in the Discussion section how this standardized local assortativity coefficient helps to explain the networks and the potential predictive power it provides.
This paper makes the following contributions.First, we adopt a local assortativity measure from the literature and provide a standardized version of it in light of the limitations that this measure might have when the network size grows.We then compare the standardized local coefficient against the global one in several networks of different fields to highlight its significance.Last, we investigate how a standardized local assortativity could provide predictive power in a dynamic network setting, and shed light on tracking systemic risk in financial markets.

Assortative mixing
The commonly used approach to measuring the assortative mixing of a network is the framework proposed by Newman [3], which measures whether nodes tend to attach to each other based on the similarity in their degrees.We define p ij as the joint probability distribution of the degrees between nodes v i and v j that satisfies the following sum rules: where a i and b j represent the fraction of edges that start and end at nodes v i and v j , respectively.If no assortative mixing is found in the network, p ij = a i b j .Otherwise, the global assortativity, GA, is defined as: where σ a and σ b denote the standard deviations of a i and b j , respectively [4].GA has a range of −1 � GA � 1, with 1 indicating perfect assortativity and -1 is perfect disassortativity.An estimate of GA in Eq (2) can be found in [3].
GA describes the assortativity of a network on a global level and is essentially the Pearson's correlation coefficient of the degree between nodes.However, in networks that show a mix of assortative and dis-assortative patterns, GA might not give an accurate picture.To look at local assortativity, LA j of a random node v j , we adopt the formula in [35]: where d j is the degree of node v j , nodes v j(i) for i = 1, . .., d j are the neighbour nodes linking to node v j , and d j(i) is the degree of the node v j(i) .This calculation is computationally less exhaustive, and assumes that all nodes in a network are, to a certain degree, disassortative.As local assortativity is a relative concept, the authors [35] argue that the average number of differences in node degrees between any node j and its neighbors can therefore be seen as the disassortativity, that is, how disassortative node j is when compared with its neighbouring nodes.Therefore, local assortativity, or LA j , can be expressed by Eq (3).
A shortcoming of LA j is that it is not scale-invariant, thus making the comparison of LA j among nodes dependent upon the values of d j .Consider a simple example having nodes j and j 0 that d j 0 = cd j , d j 0 (i) = cd j(i) and |d j − d j(i) | = M, where c and M are positive constants.It is obvious that nodes j and j 0 have the same assortative properties, but Pd j 0 i¼1 jd j 0 À d j 0 ðiÞ j ¼ cM ¼ cLA j .In addition, if nodes have a huge difference in their degree, which is not uncommon in the case of complex networks, LA j can be heavily skewed given its unbounded range of [0, +1).In view of this, we propose a standardized version of LA j , SLA j to account for the issue.Given jd j À d jðiÞ j 2 � d 2 j þ d 2 jðiÞ , we standardized the coefficient by dividing the summation of node degree differences in LA j by P d j i¼1 ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi Because of the normalization by the denominator ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi jðiÞ q instead of the denominator d j in LA j , SLA j is scale-invariant.
Fig 1 shows the effect of standardizing the coefficient in a dynamic financial network constructed using financial returns data.More details of the financial network construction are described in the section on "Data Collection".The coefficient LA j is an unbounded coefficient, whose value is scale-dependent on the difference in degrees between node j and its neighboring nodes.Values of SLA j , on the other hand, lies within the range of 0 � SLA j � 1 as jðiÞ .This provides a neater summary description of the network.According to the construction in Eq (4), when SLA j approaches one, node v j will be highly disassortative.When SLA j approaches zero, node v j will be highly assortative.To facilitate the comparison with the global assortativity, GA, we define the standardized local assortativity of node v j as making À 1 � Q ðsÞ j � 1, with larger/smaller Q ðsÞ j implying that node v j is more locally assortative/disassortative.In an extreme case where d j > 0 and all d j(i) are zeros implying that node j is highly dissortative, Q ðsÞ j ¼ À 1.In another extreme case where d j > 0 and d j = d j(i) implying that node j is highly assortative, Q ðsÞ j ¼ 1.In this paper, we will continue with this defined standardized local assortativity coefficient, Q ðsÞ j , to investigate network structures in the multiple examples, including the one shown in Fig 1.

Data collection
To demonstrate the significance of the standardized local assortativity coefficient, we made use of three networks from different fields of studies: (1) the Lancichinetti-Fortunato- Radicchi benchmark (LFR benchmark), (2) a Facebook ego, (3) a scale-free network, and (4) dynamic financial networks.The LFR benchmark network has 1000 nodes and was generated with the parameters shown in Table 1.We obtained the open Facebook ego network data from the Stanford Network Analysis Project, and it contains survey data from anonymized Facebook participants [36].Each node represents an individual with their own profile attributes, and edges are the pairwise affiliations between individuals.To construct the dynamic financial networks, we used two data sources from Reuters.We collected the daily adjusted closing price of the constituents of five selected worldwide stock market indices, using the Reuters Terminal API: 1) Hong Kong's Hang Seng Index (HSI50), 2) the United Kingdom's Financial Times Stock Exchange 100 Index (FTSE100), 3) the United States' Standard and Poor's 500 (SP500), 4) France's CAC40, and 5) Germany's DAX30, from January 2018 to June 2023.Because the constituents of the indices might change over time, we manually collected a list of all historical constituents of the indices from the Reuters terminal.Only a few records could not be mapped due to unlisted stock information, and we were able to use the remaining 1158 constituents at a different time t for further analysis in our study.

Construction of financial networks
Using the daily closing price P j,t of stock j on trading day t, we calculated the return of stock j at time t by We defined dynamic undirected networks G t = (V t , E t ) [30], where V t is the set of nodes and E t is the set of edges at time t.We calculated the sample Pearson correlation between stocks i and j at time t, ρ ij,t , using a method often referred to as a "rolling-window" approach [37], and collecting the past 21 days of historical observations (Y i,t−k , Y j,t−k ) for k = 0, . .., 20.To construct a financial network at time t, an edge e ij,t between two nodes v i and v j is created if ρ ij,t between stocks i and j at time t is greater than 0.5 [30].
The rolling-window approach enables the use of the most recent information to represent the network information at time t.

Network statistics
We made use of the degree of node v j at time t, d j,t , to investigate whether it could complement the local assortativity coefficient to predict future losses in dynamic financial networks.The degree d j,t describes the number of connections in the network G t , The network density in Table 3 was calculated as which is defined as the total number of edges in the network G t divided by the total number of possible edges with V t nodes.We also followed [3,30] to calculate the global assortativity coefficients listed in Table 3, as in Eq (10).
The global assortativity coefficient in Eq (10) can be interpreted as the degree correlation.It is calculated by using all pairs of degrees whose nodes are linked together to calculate the correlation coefficient.Therefore, it describes how strong degrees of linked nodes are related linearly with each other in the whole network (globally), rather than describing the local assortativity feature by Q ðsÞ j .In other words, the global assortativity coefficient is dominated by nodes with high degrees.In addition, if nodes that are highly assortative/disassortative have high degrees, the global assortativity tends to be positive/negative.On the other hand, the scale-invariant Q ðsÞ j measure will not be affected by the scale of the node degrees, thus making the distribution of Q ðsÞ j more objective in determining the assortativity of networks than the global assortativity coefficient is.

Correlation between standardized local assortativity and future volatility
With the daily closing price P j,t of stock j at time t, we calculated the k-period return k at time t, where k = 1, 2, 3, . ... We correlated Q ðsÞ j;t with the absolute k-period return, |Y j,t+k | of stock j at time t, with k = 1, . .., 10 to investigate the predictability of Q ðsÞ j;t for future volatility using |Y j,t+k | as a proxy: q jk;t ¼ CorrðQ ðsÞ j;t ; jY j;tþk jÞ: ð12Þ For each combination of j, k and t, we estimated q jk,t using the sample correlation based on the paired data of the past 21 days, that is, ðQ ðsÞ j;tÀ h ; jY j;tÀ hþk jÞ, h = 0, . .., 20, where h denotes a time lag within the past 21 days.Then, for each k, we produced the distribution of the correlation in Fig 5 using estimated q jk,t .

Multiple correlations between standardized local assortativity and future losses
To investigate the predictability of future losses using the standardized local assortativity, we defined the loss of stock j at time t + 1 as With that, we obtained the multiple correlation between Q ðsÞ j;tÀ l , l = 0, � � �, N, and the loss L j,t+1 by r y;x ¼ ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi where y denotes L j,t+1 , x denotes the predictor variables Q ðsÞ j;tÀ l for l = 0, � � �, N, depending on the number of lags N to include, S xy denotes the sample covariance matrix between x and y, S yx denotes the transpose of S xy , S xx denotes the sample covariance matrix between the predictor variables, S À 1  xx denotes the inverse of S xx , s 2 y denotes the sample variance of y, R xy denotes the sample correlation matrix between x and y, R yx is the transpose of R xy , R xx denotes the sample correlation matrix of the predictor variables, and R À 1  xx denotes the inverse of R xx .For each stock j and time t, the sample covariance and correlation matrices were calculated using data from the past 21 days, that is, ðQ ðsÞ j;tÀ hÀ n ; n ¼ 0; � � � ; NÞ and |L j,t−h+1 |, for h = 0, � � �, 20.We present the distribution of the multiple correlation for N = 0, � � �, 5 in Fig 6.
With the additional inclusion of network statistics, d j,t , we calculated the multiple correlations between L j,t+1 and Q ðsÞ j;tÀ l , d j,t−l , l = 0, � � �, N, using Eq (14), except x here denotes variables Q ðsÞ j;tÀ l and d j,t−l for l = 0, � � �, N.

Conditional multiple correlations between standardized local assortativity and future losses given Q ðsÞ j;t > g
The conditional multiple correlations between Q ðsÞ j;tÀ l , l = 0, � � �, N, and the loss L j,t+1 given Q ðsÞ j;t > g were also calculated using Eq (14) but ignoring those days t in which the condition Q ðsÞ j;t > g was not satisfied.In this paper, we consider γ = 0.6 as the threshold of high standardized local assortativity.

Static networks
To compare the global and local assortativity coefficients, we made use of three static networks in this study: the Lancichinetti-Fortunato-Radicchi (LFR) benchmark, a Facebook ego network, and a scale-free network.
Lancichinetti-Fortunato-Radicchi (LFR) benchmark.The LFR benchmark is a computer-generated network with prior known communities for comparing community detection methods.It is considered a proxy of real networks as it is capable of generating heterogeneous distributions of node degrees that follow the power law and the community size [38].As such, generated networks will have assortative groups, depending on parameter settings.Fig 2a shows an example of a generated LFR benchmark network with 1000 nodes and 4850 edges.Summarized in Table 2, this network had an assortativity coefficient of −0.0002, suggesting that the benchmark network was neither assortative nor disassortative, despite the visible observation of closely related clusters in the network at a high level.
Facebook ego network.The second network we considered was a network of social circles, or friend lists, from Facebook.It contains anonymized data from surveyed users [39].We chose ego networks for our research because they are especially known for being assortative in some common social attributes, such as gender, age, and political views.Respondents, or egos, are asked to list the people that are directly linked to them, or alters, and to further describe the social relationships between them based on a variety of attributes.The extracted data set contained 10 combined ego networks, each of which if looked at separately showed a fairly strong assortative pattern, with GA between 0.084 and 0.503.This aligns with what the current literature suggests that social networks tend to be assortative in nature [21].The combined network, which contained 4039 nodes and 88234 edges, as shown in Fig 2b, had a global assortativity of 0.0636 (Table 2), despite it containing multiple assortative sub-groups of individuals.This drastic change indicates that the global measure GA might not be an adequate coefficient for identifying local patterns in enormous networks.
Scale-free network.We constructed a scale-free network using a standard preferential attachment (the Barabási-Albert model) to examine its assortativity properties.We set the number of edges that were added from a new node to existing nodes in each step of the network's growth to be 5. Fig 2c shows the scale-free network with the global assortativity in Table 2 of -0.0022, which is close to zero.Here, therefore, the global measure GA shows no obvious assortative or disassortative trend globally.
Application of Q ðsÞ j on the three networks.With the limitations of GA in mind, we calculated Q ðsÞ j for each node v j for the LFR benchmark, the Facebook ego network, and the scalefree networks.The second column of Table 2 shows the median values of Q ðsÞ j for the three networks.The median Q ðsÞ j values were 0.3718, -0.2110 and -0.1382 for the LFR benchmark, the Facebook ego network, and the scale-free network, respectively, while the Facebook ego network showed slightly more non-assortative mixing among its nodes.If we look at the Q ðsÞ j distributions in Fig 2d, we can observe that the LFR benchmark network is comparatively more skewed to the left, with more nodes showing local assortative patterns, and the proportion of positive values of Q ðsÞ j was 85%.On the other hand, the Q ðsÞ j distribution of the Facebook ego network revealed a small portion of nodes with an assortative pattern, such that the proportion of positive Q ðsÞ j was approximately 38%.Other nodes appear to have fairly uniform distributions except for the nodes that had a Q ðsÞ j value of nearly −1.With Q ðsÞ j ¼ À 1 representing high disassortativity, the nodes included in the leftmost bar in the Q ðsÞ j distribution of the Facebook ego networks were highly unlikely to connect with other nodes with similar degrees.These nodes could potentially be the egos and mutual friends that acted as "hubs" linking diverse groups of friends in the network.In the scale-free network, the distribution of Q ðsÞ j is more symmetrical than it was in the LFR benchmark and Facebook ego networks.The median Q ðsÞ j was -0.1382, suggesting a locally disassortative mixing pattern.In other words, there was small tendency for nodes to connect to others with a different degree from them though GA is close to zero.

Dynamic financial networks
The same limitation of a global coefficient is believed to apply to financial networks.One interesting feature of financial being added to the picture is that these networks are dynamic, that is, changes in the stock prices and indices occur within days, if not hours [17,19].The highly varying nature of the dynamic in financial markets leads to constant changes to the network structures and it is more challenging, but still important, to capture them.
As an illustration, Fig 3 shows networks on several different trading days t.Table 3 presents the network density, global assortativity and the median Q ðsÞ j;t of the financial networks at the five selected time points.The standardized local assortativity Q ðsÞ j;t was obtained from the dynamic financial networks, as detailed in the Materials and Methods section.In Fig 3a, the network on 13 March 2020 exhibited an unusually high network density with the lowest global assortativity among the selected dates.The financial network became less dense as time went  by, and eventually separated into two big clusters at the end of 2020, as shown in Fig 3c .The network at that time had the network density, but the highest global assortative mixing compared with the other networks.The first selected date of 13 March 2020 was two days after the World Health Organization (WHO) had declared COVID-19 to be a global pandemic.On that day, with the financial market greatly affected by the COVID-19 pandemic, the global assortativity (0.14) was very different from the median standardized local assortativity, Q ðsÞ j;t (0.86).This demonstrates that our standardized local assortativity contains supplementary information on network assortative mixing.On the other two selected dates in 2020 when the financial market was relatively stable, the global assortativity and the median standardized local assortativity are relatively more consistent with each other.Table 3 also shows the network statistics for two selected dates in 2022, when we again note a large discrepancy between the global assortativity and the median Q ðsÞ j;t .Possibly due to the tensions in Ukraine, the worry of economic recession and interest rate increases, the global financial markets dropped to their lowest points in the year around these two dates.In the three dates when the GA and the median Q ðsÞ j;t were very different, the mean Q ðsÞ j;t has value smaller than the corresponding median because the distribution of Q ðsÞ j;t was skewed to the left.Fig 3 and Table 3 thus demonstrate that when the financial market is very volatile due to an unexpected shock, global assortativity and Q ðsÞ j;t can be largely inconsistent, and the global assortativity may indicate spuriously low assortative mixing among stocks.Fig 4 presents the MSCI World Index, the proportion of Q ðsÞ j;t > 0:6 at each time point, the time series of the global assortativity, and the median and interquartile range of Q ðsÞ j;t .There was severe downside movement in the MSCI in January, December 2018, March 2020 and June, October 2022, triggering potentially high systemic risk.In the five downside movements, the median and lower and upper quartiles of Q ðsÞ j;t increased sharply.The proportion of Q ðsÞ j;t > 0:6 also increased quickly when there was an extreme market adjustment.Even more striking observations were in March 2020 during the outbreak of COVID-19, when we note that the median and both quartiles of Q ðsÞ j;t were above 0.8.There were also obvious peaks in the proportion of Q ðsÞ j;t > 0:6 in June and October 2022.Together, these findings motivate us to anticipate that Q ðsÞ j;t could provide useful information for tracing systemic risk in financial markets, and thus to consider the empirical study we discuss next.
With the daily closing price P j,t of stock j on trading day t, we defined the return k periods ahead as Y j,t+k = log(P j,t+k ) − log(P j,t ) as described in Eq (11).Then, we correlated Q ðsÞ j;t with the absolute k-period return, |Y j,t+k |, where k = 1, . .., 10 to investigate the predictability of the volatility and future losses using the local assortativity feature.We were interested here in the volatility of the stocks, and we correlated Q ðsÞ j;t with |Y j,t+k | because in statistical terms, volatility refers to the standard deviation of financial returns.Unfortunately, the standard deviation of a random variable (in our case the financial returns) is not observable.Therefore, to quantify the market fluctuation, we used the absolute returns here which can be regarded as of the fluctuations [40].Correlating Q ðsÞ j;t with |Y j,t+k | for stock j would provide evidence of how the local feature is related to volatility of a stock [41].It can be observed in does not seem to provide significant predictive power for future absolute returns and thus for volatility.
Q ðsÞ j;t and future losses.Instead of correlating Q ðsÞ j;t with the absolute return |Y j,t+k |, we next focused only on trading days t + 1 when a loss occurred.In other words, we explored the multiple correlations between the local coefficient Q ðsÞ j;tÀ l for l = {0, � � �, 5} on trading day t − l, and the loss on trading day t + 1, denoted as L j,t+1 in Eq (13).In this investigation, "l + 1" represents the number of lagged variables in the vector (Q ðsÞ j;tÀ l ; . . .; Q ðsÞ j;t ) to correlate with L j,t+1 .For example, if l = 2, we study the multiple correlation of the previous three standardized local assortativity (Q ðsÞ j;tÀ 2 , Q ðsÞ j;tÀ 1 , Q ðsÞ j;t ) to correlate with L j,t+1 .The network degree of node v j at time t − l, d j,t−l was added alongside Q ðsÞ j;tÀ l to investigate whether the network statistics could complement each other and provide additional predictive power to future losses.
The density ridge plot in Fig 6 suggests a moderately positive correlation between Q ðsÞ j;tÀ l and L j,t+1 .A stronger correlation with L j,t+1 emerged when more lags were included, in contrast to the previous case when we correlated Q ðsÞ j;t with |Y j,t+k | in Fig 5 .The standardized local assortativity seemed to be more related to actual financial losses than to market volatility.
When d j,t−l was added into the equation, the strength in correlation increased further.For example, the medians of the multiple correlations were 0.130 and 0.078 for l = 0, and 0.221 and 0.147 for l = 5, with and without d j,t−l , respectively.Combining the degree of nodes and the Conditioned ðsÞ j;t and future losses.The correlation between Q ðsÞ j;t and L j,t+1 has suggested that the standardized local assortativity of financial networks tends to correlate with future loss.In Fig 4, the top panel gives the proportion of stocks with Q ðsÞ j;t > 0:6 on each day.When this proportion of locally assortative stocks with Q ðsÞ j;t > 0:6 is high, the financial market tends to adjust downward.Taking this one step further, we calculated the multiple correlations of Q ðsÞ j;t and L j,t+1 on days t, conditioned on Q ðsÞ j;t being greater than a threshold of 0.6.The main purpose was to pick out days when stock j exhibited a highly assortative pattern locally.When this occurred, we wanted to know whether the standardized local assortativity would help in detecting future losses more accurately.was greater than 0.6.The results show a drastic increase in the multiple correlations between future loss and the respective lagged Q ðsÞ j;tÀ l .As with the previous graph, we observe that the more lags we included, the stronger the positive correlation was.However, we also see that the distributions were heavily skewed when compared with those in Fig 6 .On the left panel, when only Q ðsÞ j;tÀ l with five lags were included, the median of multiple correlations had increased to approximately 0.32.On the other hand, when d j,t−l was added to the picture, in the right panel the median of multiple correlations was already close to 0.4 when five lags were included, suggesting that Q ðsÞ j;tÀ l and d j,t−l for l = {0, � � �, 5} may help predict future losses when the node time t exhibits assortative behaviors.From the risk management perspective, the inclusion of a large number of lags is generally not recommended; however, the experiments show the potential predictive power for future losses by using the standardized local assortativity coefficient in dynamic financial networks.

Discussion
With increasingly complex networks and the presence of clusters with their own degree of assortativity, we see the inadequacy of using a single global measure to quantify the assortative mixing of networks.We have shown a few networks with social and financial data in this research, all of which have indicated that local patterns are smoothed out if we simply use a global assortativity coefficient to summarize the networks.A few research studies have suggested the use of local assortativity [34,35].However, there has not been a universal definition of how local assortativity should be calculated.more, the downside of the definition proposed by [35] faces the issue of unbounded upper ranges as the network size grows.To handle that shortcoming, we propose a standardized version of the previously defined local assortativity, with the coefficient lying within the range of -1 and 1, thus providing a neater summary representation of networks.
In this paper we tested the standardized local assortativity coefficient on several networks, from a generated community detection benchmark, to a real-world Facebook ego network, and to dynamic financial networks.In our LFR benchmark network, the global coefficient suggested neutral assortative mixing despite the presence of communities in the network.Facebook's social network also showed that the global coefficient failed to capture the assortative nature of an ego network.The application of a standardized local measure, as is shown in  3 demonstrates a substantial discrepancy between the median Q ðsÞ j;t and the assortativity in March 2020, signifying incredibly high systemic risk when the COVID-19 pandemic began to have a great impact on the world economy and financial markets.As is more evidence in Fig 4, the proportion of stocks having high values of Q ðsÞ j;t greater than 0.6 in our case might provide good early warning signals on severe market downturns.
Standardized local assortativity was also seen to provide predictive power in the chosen financial networks.Whereas the global assortativity at time t was unable to predict the future absolute returns, a proxy as future volatility, Q ðsÞ j;tÀ l did provide a higher predictive power in the case of a loss situation in the future.The standardized local assortativity coefficient Q ðsÞ j;tÀ l , when in combination with other network statistics (i.e., network degree in our case), showed even higher predictive power for the future performance in terms of loss.The correlation became stronger when more lags of Q ðsÞ j;tÀ l were included.To further test out scenarios when networks were showing highly assortative patterns, we selected networks with Q ðsÞ j;t above the threshold of 0.6, and the predictability became even more obvious.When we included only the one lag of Q ðsÞ j;tÀ l , the median correlation was already as strong as when we included five lags where no conditioning of Q ðsÞ j;t was applied, and the correlation continued to increase up to a median value of approximately 0.3 when five lags were included.The network degree provided an extra boost to the correlation when it was included: the median of multiple correlations went from approximately 0.25 if only one lag was included, to nearly 0.5 with five lags of Q ðsÞ j;tÀ l .The results thus suggest the possibility of gaining extra insights from micro-features for financial risk management, if we construct networks out of the financial stock prices and observe the dates when the networks are highly assortative locally, we potentially will be able to foresee future losses and take preparedness action for risk management.
We saw that the standardized local assortativity coefficient complements other network statistics: when it is included, its correlation becomes stronger with future losses in dynamic financial networks.Whereas other network statistics have their own significance, we advocate the use of a local assortativity coefficient because it provides a summary of both the homophilic and resilient characteristics of a network.
We also may be able to draw implications for financial risks from the local assortativity coefficient.When nodes are more locally assortative, it implies that stocks will have a higher coherence of degrees with their neighbor nodes in the network, and we could use that coherence to provide early warning signals of severe market downturns or to predict a loss situation in the foreseeable future, as is shown in Figs 4 and 7.The visualization in Fig 3a shows that this high coherence of degrees or local assortative mixing can occur locally in many clusters that global assortativity cannot capture.The big mismatch of global assortativity and standardized local assortativity could be a potential indicator to inform us of unusual homophilic characteristics forming in a network in the future, and providing an early signal of increased systemic risk in financial markets.Further research needs to be conducted next on the modeling of local assortative patterns on financial risks.

Conclusions
This study applied the standardized local assortativity coefficient on generated benchmarks in social networks, and in dynamic financial networks, but we believe it is possible that this concept can be extended to other networks in other fields, such as biology, epidemiology, and technology, to take into account the local features that otherwise can be easily omitted in

Fig 1 .
Fig 1.The effects of standardizing the local assortativity, LA j in Eq (3) to SLA j in Eq (4), and their confidence intervals.The results were obtained by constructing a dynamic financial network using daily financial returns from global markets.https://doi.org/10.1371/journal.pone.0292327.g001

Fig 2 .
Fig 2. Three static networks used in this study and their Q ðsÞ j distributions.(a) The LFR benchmark.(b) Social networks-Facebook ego network.(c) Scale-free network.(d) The Q ðsÞ j distribution for the LFR benchmark, Facebook ego network and Scale-free network.The color of each node in the network plots in (a) through (c) represents the value of Q ðsÞ j , ranging from -1 to 1 on a gradient scale: red represents -1 (highly disassortative), yellow represents 0, and blue represents 1 (highly assortative).https://doi.org/10.1371/journal.pone.0292327.g002

Fig 3 .
Fig 3.An illustration of financial networks on five randomly selected trading days.(a) 13 March 2020.(b) 16 July 2020.(c) 2 December 2020.(d) 22 June 2022.(e) 5 October 2022; The color of each node in the networks represents the value of Q ðsÞ j , ranging from -1 to 1 on a gradient scale: red represents -1 (highly disassortative), yellow represents 0, and blue represents 1 (highly assortative).https://doi.org/10.1371/journal.pone.0292327.g003 Fig 5 that in our case Q ðsÞ j;t and |Y j,t+k | were not linearly correlated.Regardless of the lag k under observation, Q ðsÞ j;t

Fig 4 .
Fig 4. Top panel: the time series plot of the MSCI World Index from January 2018 to June 2023 (showing the worldwide financial market performance), and the proportion of stocks having Q ðsÞ j;t greater than 0.6 at each time point; Bottom panel: plots of the global assortativity (green line) and the median Q ðsÞ j;t (red line) with its interquartile ranges highlighted by yellow regions.https://doi.org/10.1371/journal.pone.0292327.g004

Fig 7
displays a view similar to Fig 6, except the correlation was conditioned to when Q ðsÞ j;t

Table 2
also presents the mean values of Q ðsÞ j which are consistent with what we observe from the median Q ðsÞ j .